package com.dmall.scf

import com.dmall.scf.action.TestAction
import com.dmall.scf.utils.SparkUtils
import org.apache.spark.sql.SparkSession

/**
 * @descrption
 * scf-spark
 * @author wangxuexing
 * @date 2019/12/27
 */
object Test {
  def main(args: Array[String]): Unit = {
    if(args == null || args.length == 0){
      throw new Exception("请指定Action！")
    }
    val spark: SparkSession = SparkUtils.getEnv.spark
    args(0) match {
      case TestAction.CLASS_NAME => TestAction.execute(args, spark)
      case _ => throw new Exception(s"没有指定的Action：${args(0)}！")
    }
    spark.stop()
  }
}
